import java.awt.event.MouseWheelEvent;

import headfirst.command.Light;
import headfirst.command.LightsOffCommand;
import headfirst.command.LightsOnCommand;
import headfirst.command.RemoteControl;
import headfirst.command.Stereo;
import headfirst.command.StereoOffCommand;
import headfirst.command.StereoOnWithCDCommand;

public class RemoteLoader {

	public static void main(String[] args) {
		RemoteControl remoteControl = new RemoteControl();

		Light livingRoomLight = new Light("Living Room");
		Light kitchenLight = new Light("Kitchen");

		Stereo stereo = new Stereo("Living Room");

		LightsOnCommand livingRoomLightOn = new LightsOnCommand(livingRoomLight);
		LightsOffCommand livingRoomLightOff = new LightsOffCommand(livingRoomLight);

		LightsOnCommand kitchenLightOn = new LightsOnCommand(kitchenLight);
		LightsOffCommand kitchenLightOff = new LightsOffCommand(kitchenLight);

		StereoOnWithCDCommand stereoOnWithCD = new StereoOnWithCDCommand(stereo);
		StereoOffCommand stereoOff = new StereoOffCommand(stereo);

		remoteControl.setCommand(0, livingRoomLightOn, livingRoomLightOff);
		remoteControl.setCommand(1, kitchenLightOn, kitchenLightOff);
		remoteControl.setCommand(2, stereoOnWithCD, stereoOff);

		System.out.println(remoteControl);

		remoteControl.onButtonWasPushed(0);
		remoteControl.offButtonWasPushed(0);

		remoteControl.onButtonWasPushed(1);
		remoteControl.offButtonWasPushed(1);

		remoteControl.onButtonWasPushed(2);
		//remoteControl.offButtonWasPushed(2);

		System.out.println("----------------------------");

		remoteControl.undoCommandPushed();
	}
}
